<?php
// +----------------------------------------------------------------------
// | ZGUAN [ 致力于帮助更多的中小企业物联网转型 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2024 https://www.zguan.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ZGUAN 并不是自由软件，未经许可不能去掉ZGUAN 相关版权
// +----------------------------------------------------------------------
// | Author: ZGUAN Team <admin@zguan.cn>  0769-82282996  15899929162
// +----------------------------------------------------------------------
namespace app\common\model\article\guide;

use think\Model;
use app\common\model\BaseModel;
use app\common\model\system\upload\SystemUploadFileModel;

class GuideModel extends BaseModel
{

    public static function tablePk(): string
    {
        return 'id';
    }

    public static function tableName(): string
    {
        return 'article_guide';
    }

    public function cateInfo()
    {
        return $this->hasOne(GuideCateModel::class, 'id', 'cate_id')->field('id,name');
    }


    public function fileInfo()
    {
        return $this->hasOne(SystemUploadFileModel::class, 'id', 'picture_id');
    }


}
